var _n34;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var $2UIManager = require("UIManager");
var $2UserDataManager = require("UserDataManager");
var $2NoCoinUI = require("NoCoinUI");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var def_MoneyPanelUI = _n34 = /* */function (_cc$Component49) {
  babel_inherits(n, _cc$Component49);
  var _super53 = babel_createSuper(n);
  function n() {
    var _this117;
    babel_classCallCheck(this, n);
    _this117 = _super53.apply(this, arguments);
    _this117.diamondNum = null;
    _this117.goldNum = null;
    return _this117;
  }
  babel_createClass(n, [{
    key: "onLoad",
    value: function onLoad() {
      _n34._instance = this;
      this.refreshMoneyPanel();
    }
  }, {
    key: "refreshMoneyPanel",
    value: function refreshMoneyPanel() {
      this.diamondNum.string = Math.floor($2UserDataManager.default.instance.diamond) + "";
      this.goldNum.string = Math.floor($2UserDataManager.default.instance.gold) + "";
    }
  }, {
    key: "onClickAddCoin",
    value: function onClickAddCoin() {
      $2UIManager.default.instance.openUI("NoCoinUI", 50).getComponent($2NoCoinUI.default).init(0);
    }
  }, {
    key: "onClickAddDiamond",
    value: function onClickAddDiamond() {
      $2UIManager.default.instance.openUI("NoCoinUI", 50).getComponent($2NoCoinUI.default).init(1);
    }
  }], [{
    key: "instance",
    get() {
      return this._instance;
    }
  }]);
  return n;
}(cc.Component);
def_MoneyPanelUI._instance = null;
cc__decorate([ccp_property(cc.Label)], def_MoneyPanelUI.prototype, "diamondNum", undefined);
cc__decorate([ccp_property(cc.Label)], def_MoneyPanelUI.prototype, "goldNum", undefined);
def_MoneyPanelUI = _n34 = cc__decorate([ccp_ccclass], def_MoneyPanelUI);
exports.default = def_MoneyPanelUI;